package crazy.memory;

public class Test
{
	public static void main(String[] args)
	{
		new Derived();
	}
}

abstract class Base
{
	private int i = 2;
	
	public Base()
	{
		System.out.println(this.i);
		this.display();
		System.out.println(this.getClass());
		this.sub();
	}
	
	public void display()
	{
		System.out.println(i);
	}
	
	public abstract void sub();
}

class Derived extends Base
{
	private int i = 22;
	
	public Derived()
	{
		super();
		i = 222;
		display();
		
	}
	
	public void display()
	{
		System.out.println("Derived i->"+i);
	}
	public void sub()
	{
		System.out.println("sub==");
	}
}
